import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/widgets.dart' hide Action;  //注意1
import 'action.dart';
import 'state.dart';
import 'package:app_happy_flutter/code/Base/C/app_route.dart';
Effect<GridState> buildEffect() {
  return combineEffects(<Object, Effect<GridState>>{
    Lifecycle.initState: _init, //页面初始化
    GridAction.action: _onAction,
    GridAction.onOpenList: _onOpneList,
  });
}

void _onAction(Action action, Context<GridState> ctx) {
}
void _init(Action action, Context<GridState> ctx) {
  ctx.dispatch(GridActionCreator.onLoadData()); //发送事件
}
void _onOpneList(Action action, Context<GridState> ctx) {
  Navigator.of(ctx.context).pushNamed(RoutePath.todoListPage, arguments: null);    //注意2
}
